package com.crazyteam.genid.thread;

import com.crazyteam.genid.model.KeyInfo;
import com.crazyteam.genid.service.PrimaryKeyService;

/**
 * @Desc 
 * @Author  guoyang
 * @CreateTime  2016-3-3 上午10:36:35
 */
public class ExpandThread extends Thread{

    private PrimaryKeyService primaryKeyService;
    private final KeyInfo keyInfo;
    
    public ExpandThread(PrimaryKeyService primaryKeyService, final KeyInfo keyInfo){
        this.primaryKeyService = primaryKeyService;
        this.keyInfo = keyInfo;
    }
    
    @Override
    public void run(){
        primaryKeyService.syncExpandKey(keyInfo);
    }
}

